.PHONY : all clean

CC := gcc
MKDIR := mkdir
RM := rm -rf

SRCS := $(wildcard *.c)
DEPS := $(SRCS:.c=.dep)

include $(DEPS)

all :
	@echo "$@"

%.dep : %.c
	@echo "Creating $@ ..."
	@set -e;\
	$(CC) -MM -E $^ | sed 's,\(.*\)\.o[ :]*,objs/\1.o : ,g' > $@

clean :
	$(RM) $(DEPS)
